import { Boot, MainScene } from './scenes';
import { AUTO, Game } from 'phaser';

const config: Phaser.Types.Core.GameConfig = {
    type: AUTO,
    width: 1000,
    height: 800,
    parent: 'game-container',
    backgroundColor: 'fff',
    physics: {
        default: "arcade",
        arcade:{
            fixedStep:true,
            gravity:{
                x:0,
                y:0
            }
        }
    },
    scene: [
        Boot, MainScene
    ],
    fps:{
        target: 50,
        forceSetTimeOut: true
    }
};

const StartGame = (parent: string) => {
    return new Game({ ...config, parent });
}

export default StartGame;